 <?php 
 
 header("Content-Type: text/html; charset=gbk");
 error_reporting(E_ALL ^(E_NOTICE | E_WARNING));  
 //http://192.168.0.111/lime/com.attilax.php/lang/api.php?iocx=iocx_timer&method=setTime&timex=9999&movie=atimovie&movie_cn=@movie_cn
 
  //http://192.168.0.111/\boxsys_t/com.attilax.php/lang/api.php?iocx=iocx_timer&method=setTime&timex=9999&movie=atimovie&movie_cn=@movie_cn
 
// $sql = "update timer_tab set timex=@timex where no='@no'";	
 // 返回所有包含浮点数的元素
//  ereg("@.+?\b", $sql,$a);
  preg_match_all('/@.+?\b/', $sql,$a);
 // die();
//print_r($a);
//die();
 //http://localhost/lime/com.attilax.php/lang/api.php?iocx=iocx_timer&method=setTime&no=1&tim=3700
 
 //
  //	 require_once(dirname(__FILE__).'/../../com.attilax/dwr.php');
 
 
// error_reporting(E_ALL ^ E_NOTICE); 

// require_once(dirname(__FILE__).'/../../box/box.php');
 //eval
 
 if($_GET["iocx"]!="" && $_GET["iocx"]!="")
	 require_once(dirname(__FILE__).'/../../'.$_GET["iocx"].'.php');
 //else
//	 require_once(dirname(__FILE__).'/../iocx.php');

//$dwrEventContainer['b'] = 'char b'; 
 
 
 $method=   $_GET['$method']; 
 
 
 $meth=$method;
 $param= $_GET["param"];
 $param=iconv("utf-8","gbk//IGNORE",$param);
 //echo $param;die();
 require_once(dirname(__FILE__).'/../lang/String.php');
require_once(dirname(__FILE__).'/../cms/CmsImp_4Imovie.php');

 
require_once(dirname(__FILE__).'/../cms/CmsImpLocalFileVer.php');

CmsImpLocalFileVer::$maindir=dirname(__FILE__)."/../../z";
//echo CmsImpLocalFileVer::$maindir;die();
//"d:/z";
require_once(dirname(__FILE__).'/../lang/String.php');
require_once(dirname(__FILE__).'/../util/jsonX.php');


require_once(dirname(__FILE__).'/../cms/CmsImp_4Imovie.php');
require_once(dirname(__FILE__).'/../util/Map.php');
require_once(dirname(__FILE__).'/../util/HashMap.php');
require_once(dirname(__FILE__).'/../util/ArrayList.php');

require_once(dirname(__FILE__).'/../util/jsonX.php');
//$meth="com.attilax.php/cms/CmsImp_4Imovie.php/CmsImp_4Imovie.get_post";
$meth=new String($meth);

 
$file=getFilePa($meth);
 //print_r($file); die();
require_once(dirname(__FILE__).'/../../'.$file[0]);
 
$cls=$file[1];
$o=new $cls();
$methodPa=$file[2];
// print_r($file);  die(); 
//echo $o->$file[2];

function getFilePa($meth)
{
	
	$i=$meth->lastIndexOf("/");
	$s=$meth->substring(0,$i);
	$a[]=$s;
	$s2=$meth->substring($i+1);
	
	$s3=new String($s2);
	$a2=$s3->split(".");
	$a4=$a2->toPhpArr();
$a7=	array_merge($a,$a4);
	return $a7;
	
	
 
}


 
  global $vars_list;
	 
 $vars_list["method"]=$method;
 $fun=$o->$methodPa;
 //echo "----";
// print_r($fun);  die(); 
 //@ $dwrEventContainer[ $method];
 
 $GLOBALS["varx"]["method"]=$method ;
 
  $GLOBALS["varx"]["fun"]=$fun ;
  $vars_list["fun"]=$fun;
//  print_r($GLOBALS["varx"]);
 // print_r($GLOBALS["varsx"]);
  $GLOBALS["varx"]["get..param"]=@$_GET['param'] ;
 
  try{
	  if( @$_GET['param']=="")
	  {
		   $GLOBALS["stack"][]="param is empty";
 			$rzt=$fun();
	  }
		else
		{
			//die();
			 $GLOBALS["stack"][]="param not empty";
			$rzt=$o->$methodPa($param);
			
			$a=$rzt->toPhpArr();
			$s=ch_json_encode($a);
			echo $s;
			die();
		}
  }catch(Exception $e)
  {
	echo  json_encode($e);// "err";
	exit;
  }
 
$vars_list["rzt"]=$rzt;
 echo $rzt;
// echo "111";
 //print_r($vars_list);
//  print_r($GLOBALS["varx"]);
 ?>